﻿using System;
using System.Collections.Generic;
using System.Text;

namespace WHC.Hotel.UI
{
    public delegate void ReFlashParentWinHandle();

    /// <summary>
    /// 功能：用于打开子窗口操作后回调父窗口操作的辅助类
    /// 用法：子窗增加一个构造函数，接收类型为：WinFormCallBackHelp
    /// </summary>
    public class WinFormCallBackHelp
    {

        private string _action = "add";

        /// <summary>
        /// 操作标志
        /// </summary>
        public string Action
        {
            get { return _action; }
            set { _action = value; }
        }


        private string _mainKey = string.Empty;

        /// <summary>
        /// 主键字段
        /// </summary>
        public string MainKey
        {
            get { return _mainKey; }
            set { _mainKey = value; }
        }

        private string _ExpandInfo = string.Empty;


        /// <summary>
        /// 扩展信息
        /// </summary>
        public string ExpandInfo
        {
            get { return _ExpandInfo; }
            set { _ExpandInfo = value; }
        }



        /// <summary>
        /// 声明事件
        /// </summary>
        public event ReFlashParentWinHandle ReFlashParentWinHandleEvent;

        //触发事件
        public void ReFlashParentWindow()
        {

            if (ReFlashParentWinHandleEvent != null)
            {

                ReFlashParentWinHandleEvent();

            }

        }



    }
}
